// 用 suspence 做一个异步加载,划分页面中需要并发渲染的部分
import React, { Suspense } from "react"
import ReactDOM from "react-dom/client"
import { HashRouter } from "react-router-dom"
// 通过 ThemeProvider 提供全局主题样式
import { ThemeProvider } from "styled-components"

import App from "./App"
// 引入 antdesign 的样式
import "antd/dist/reset.css"
// normalize.css css样式重置，比如清除页面的内外边距
import "normalize.css"
import "@/assets/css/index.less"
import store from "./store"
import theme from "./assets/theme"
import { Provider } from "react-redux"

const root = ReactDOM.createRoot(document.getElementById("root"))
root.render(
  <>
    {/* 对于 provide 和 hashrouter 之间，谁在外面都可以 */}
    <Provider store={store}>
      <ThemeProvider theme={theme}>
        <HashRouter>
          <App />
        </HashRouter>
      </ThemeProvider>
    </Provider>
  </>
)
